package com.battleship;

import com.battleship.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ViewFlipper;

public class BattleshipActivity extends Activity {

	private Button newGameButton, internetButton, backButton, instructionsButton;
	private ViewFlipper vf;
	private Activity activity;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		activity = this;
		setContentView(R.layout.flipper);

		vf = (ViewFlipper) findViewById(R.id.flipper);

		newGameButton = (Button) findViewById(R.id.new_game_button);
		newGameButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {

				vf.showNext();

			}
		});
		instructionsButton = (Button) findViewById(R.id.instructions_button);
		instructionsButton.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				
			}
		});

		internetButton = (Button) findViewById(R.id.internet_button);
		internetButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent i = new Intent(activity, InternetGameActivity.class);
				startActivity(i);
				activity.finish();

			}
		});
		
		backButton = (Button) findViewById(R.id.bluetooth_button);
		backButton.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				vf.showPrevious();
				
			}
		});
	}

	public void settingsButton(View v) {
		Intent i = new Intent(this, SettingsActivity.class);
		startActivity(i);

	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
	}

}